package com.laowang.utils;

import com.laowang.vo.ResultVo;

/**
 * Created by Administrator on 2019/1/10.
 */
public class ResultVoUtil {
    public static ResultVo success(){
        ResultVo resultVo =new ResultVo();
        resultVo.setMsg("成功");
        resultVo.setCode(0);
        return resultVo;
    }
    public static ResultVo success(Object object){
        ResultVo resultVo =new ResultVo();
        resultVo.setMsg("成功");
        resultVo.setCode(0);
        resultVo.setData(object);
        return resultVo;
    }

    public static ResultVo error(Integer code,String msg){
        ResultVo resultVo =new ResultVo();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;

    }
}
